package xyz.labmem.main.modular.app.gmjj.mapper;

import org.apache.ibatis.annotations.Select
import xyz.labmem.main.modular.app.gmjj.entity.Swzyjshkyrycjb

import org.springframework.stereotype.Repository
import xyz.labmem.base.core.entity.ModuleVo
import xyz.labmem.main.modular.common.mapper.AppBaseMapper

/**
 * 水文专业技术和科研人员采集Mapper接口
 *
 * @author ruoyi
 * @date 2022-02-24
 */
@Repository
interface Swzyjshkyrycjb_Mapper : AppBaseMapper<Swzyjshkyrycjb>{
    @Select("select \${cloum} as name,sum(IFNULL(swjsryr_swybg,0)+IFNULL(swjsryr_swgcg,0)+IFNULL(swjsryr_swxcg,0)+IFNULL(swjsryr_zhg,0)+IFNULL(swjsryr_qt,0)+IFNULL(swkyryr,0)) as value from swzyjshkyrycjb group by \${cloum}  order by \${cloum} ")
    fun selectCountByTable(clomn : String) : ArrayList<ModuleVo>

    @Select("select sum(swjsryr_swybg) swjsryr_swybg,sum(swjsryr_swgcg) swjsryr_swgcg,sum(swjsryr_swxcg) swjsryr_swxcg,sum(swjsryr_zhg) swjsryr_zhg,sum(swjsryr_qt) swjsryr_qt,sum(swkyryr) swkyryr " +
            "from swzyjshkyrycjb ")  //where tbrq like concat('#{date}, '%')
    fun selectChart(date : String) : Swzyjshkyrycjb
}
